{{include_file name='public/header' title='管理中心'}}
<style>
    .huge {
        font-size: 35px;
    }
</style>
</head>

<body>

<div id="wrapper">

    <!-- Navigation -->
    {{include_file name='public/nav' sidebar='sidebar'}}
    <div id="page-wrapper">
        <div class="row">
            <div class="col-lg-12">
                <h1 class="page-header">管理中心</h1>
            </div>
            <!-- /.col-lg-12 -->
        </div>
        {{if $last_login}}
        <div class="alert alert-warning fade in m-b-15">
            <strong>温馨提示!</strong>
            您上次登录时间{{$last_login.add_time}}，登录地点{{$last_login.address}} ，登录设备 {{\app\user::get_device_list('icon', {{$last_login.device}})}} ，更多登录历史请点击<a href="{{url('admin/history/login')}}?user_id={{$user.id}}">这里</a>。
            <span class="close" data-dismiss="alert">×</span>
        </div>
        {{/if}}
        <!-- /.row -->

        <div class="row">
            <div class="col-lg-3 col-md-6">
                <div class="panel panel-primary">
                    <div class="panel-heading">
                        <div class="row text-center">
                            <div class="col-xs-4">
                                <i class="fa fa-user fa-4x"></i>
                                <div>会员</div>
                            </div>
                            <div class="col-xs-8">
                                <div class="huge">{{\app\statistics::get_all_num('user')}}</div>
                                <div>今日新增{{\app\statistics::get_today_num('user')}}</div>
                            </div>
                        </div>
                    </div>

                </div>
            </div>
            <div class="col-lg-3 col-md-6">
                <div class="panel panel-green">
                    <div class="panel-heading">
                        <div class="row text-center">
                            <div class="col-xs-4">
                                <i class="fa fa-th fa-4x"></i>
                                <div>项目</div>
                            </div>
                            <div class="col-xs-8">
                                <div class="huge">{{\app\statistics::get_all_num('project')}}</div>
                                <div>今日新增{{\app\statistics::get_today_num('project')}}</div>
                            </div>
                        </div>
                    </div>

                </div>
            </div>
            <div class="col-lg-3 col-md-6">
                <div class="panel panel-yellow">
                    <div class="panel-heading">
                        <div class="row text-center">
                            <div class="col-xs-4">
                                <i class="fa fa-folder-open fa-4x"></i>
                                <div>模块</div>
                            </div>
                            <div class="col-xs-8">
                                <div class="huge">{{\app\statistics::get_all_num('module')}}</div>
                                <div>今日新增{{\app\statistics::get_today_num('module')}}</div>
                            </div>
                        </div>
                    </div>

                </div>
            </div>
            <div class="col-lg-3 col-md-6">
                <div class="panel panel-red">
                    <div class="panel-heading">
                        <div class="row text-center">
                            <div class="col-xs-4">
                                <i class="fa fa-files-o fa-4x"></i>
                                <div>接口</div>
                            </div>
                            <div class="col-xs-8">
                                <div class="huge">{{\app\statistics::get_all_num('api')}}</div>
                                <div>今日新增{{\app\statistics::get_today_num('api')}}</div>
                            </div>
                        </div>
                    </div>

                </div>
            </div>
        </div>

        <div class="row">
            <div class="col-lg-6">

                <!-- /.panel -->
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <i class="fa fa-user fa-fw"></i> 会员统计
                    </div>
                    <!-- /.panel-heading -->
                    <div class="panel-body">
                        <div id="user-chart" style="width: 100%;height:400px;"></div>
                    </div>
                    <!-- /.panel-body -->
                </div>
                <!-- /.panel -->
            </div>
            <div class="col-lg-6">

                <!-- /.panel -->
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <i class="fa fa-bar-chart-o fa-fw"></i> 项目统计
                    </div>
                    <!-- /.panel-heading -->
                    <div class="panel-body">
                        <div id="project-chart" style="width: 100%;height:400px;"></div>
                    </div>
                    <!-- /.panel-body -->
                </div>
                <!-- /.panel -->
            </div>
            <!-- /.col-lg-8 -->

            <!-- /.col-lg-4 -->
        </div>

        <div class="row">
            <div class="col-lg-6">

                <!-- /.panel -->
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <i class="fa fa-dribbble fa-fw"></i> 系统信息
                    </div>
                    <!-- /.panel-heading -->
                    <div class="panel-body">
                        <p>程序版本：V{{$system.gophp_version}} [<a href="https://github.com/gouguoyin/phprap" target="_blank">查看最新版本</a>]</p>
                        <p>系统环境：{{PHP_OS}}+PHP{{$system.php_version}}+MySQL{{$system.mysql_version}}</p>
                        <p>使用技术：PHP+MySQL+Bootstrap+JQuery</p>
                        <p>系统开发：<a target="_blank" href="http://www.gouguoyin.cn/about.html">勾国印</a></p>
                        <p>演示网站：<a target="_blank" href="http://phprap.gouguoyin.cn">apidoc.gouguoyin.cn</a></p>
                        <p>官方网站：<a target="_blank" href="http://phprap.gouguoyin.cn/">phprap.gouguoyin.cn</a></p>
                        <p>官方QQ群：<a target="_blank" href="//shang.qq.com/wpa/qunwpa?idkey=cf9440f673d6a29150bb8f033ed5fdf0e4e685f92350b7006778660bf8580f57"><img border="0" src="//pub.idqqimg.com/wpa/images/group.png" alt="GoPHP官方交流群" title="GoPHP官方交流群"></a></p>
                    </div>
                    <!-- /.panel-body -->
                </div>
                <!-- /.panel -->
            </div>
            <div class="col-lg-6">

                <!-- /.panel -->
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <i class="fa fa-comments fa-fw"></i> 常见问题
                    </div>
                    <!-- /.panel-heading -->
                    <div class="panel-body">
                        <p>程序版本：V2.0  [20150905] [<a href="">查看最新版本</a>]</p>
                        <p>服务器环境：Apache</p>
                        <p>文件上传大小：10M</p>
                        <p>系统开发：勾国磊</p>
                        <p>官方网站：<a href="">www.gouguoyin.cn</a></p>
                        <p>官方论坛：<a href="">bbs.gouguoyin.cn</a></p>
                        <p>帮助中心：<a href="">help.gouguoyin.cn</a></p>
                    </div>
                    <!-- /.panel-body -->
                </div>
                <!-- /.panel -->
            </div>
            <!-- /.col-lg-8 -->

            <!-- /.col-lg-4 -->
        </div>
        <!-- /#page-wrapper -->

    </div>
    <!-- /#wrapper -->
    <hr>
    <p class="text-center">{{get_config('copyright')}}</p>

    <script type="text/javascript" src="{{STATIC_URL}}/plugins/echarts/echarts.min.js"></script>
    <script type="text/javascript">
        // 基于准备好的dom，初始化echarts实例
        var myChart = echarts.init(document.getElementById('user-chart'));

        // 指定图表的配置项和数据
        var option = {
            title: {
                text: 'ECharts 入门示例'
            },
            tooltip: {},
            legend: {
                data:['销量']
            },
            xAxis: {
                data: ["衬衫","羊毛衫","雪纺衫","裤子","高跟鞋","袜子"]
            },
            yAxis: {},
            series: [{
                name: '销量',
                type: 'bar',
                data: [5, 20, 36, 10, 10, 20]
            }]
        };

        // 使用刚指定的配置项和数据显示图表。
        myChart.setOption(option);

        // 基于准备好的dom，初始化echarts实例
        var myChart = echarts.init(document.getElementById('project-chart'));

        // 指定图表的配置项和数据
        var option = {
            title: {
                text: 'ECharts 入门示例'
            },
            tooltip: {},
            legend: {
                data:['销量']
            },
            xAxis: {
                data: ["衬衫","羊毛衫","雪纺衫","裤子","高跟鞋","袜子"]
            },
            yAxis: {},
            series: [{
                name: '销量',
                type: 'bar',
                data: [50, 45, 55, 38, 43, 20]
            }]
        };

        // 使用刚指定的配置项和数据显示图表。
        myChart.setOption(option);
    </script>
    {{include_file name='public/footer'}}
